﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <HEAD>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>工作管理-<{$smarty.const.WEB_NAME}></title>
	<link rel="stylesheet" type="text/css" href="./skin/default/style.css" />
	<script type="text/javascript" src="./skin/default/comm.js"></script> 
	<style type="text/css">
		  body	{font-size:13px;}
	</style>
 </HEAD>

 <BODY onload="OnInit(<{$smarty.session.id}>, <{$smarty.session.departmentId}>, <{$smarty.session.type}>)">
	<table cellspacing="0" width="1000"  height="100%" border="0" cellpadding="0" align="center" style="font-size:13px;">
		<tr>
			<td colspan="2"><{include file="#header.html"}></td>
		</tr>
		<tr>
			<td colspan="2">
			<div style="font-size:13px;" class="headerTip"> 
				<ul>
					<li><a href="#" onclick="OnWorkPlan(<{$smarty.session.departmentId}>)">工作计划</a></li>
					<li><a href="#" onclick="OnWorkTask(<{$smarty.session.id}>)">工作任务</a></li>
				</ul>
			 </div>
			 </td>
		</tr>
		<tr>
		   <td valign="top" align="left" >
			   <div style="width:1300px; overflow:hidden;">
				  <iframe src="#" name="workMgrDesc" id="workMgrDesc" height="2000" width="100%" frameborder="0" scrolling="no"></iframe>
			   </div>
		   </td>
	    </tr>
	</table>

	<script type="text/javascript">
	<!--
		function OnInit(userId, departmentId, userType) {
			if( userType == 2 ) {
				document.getElementById("workMgrDesc").src = "index.php?q=workManage/viewWorkPlan";
			} else if( userType == 1) {
				document.getElementById("workMgrDesc").src = "index.php?q=workManage/viewWorkTask&mode=dept&departmentId=" + departmentId;
			} else {
				document.getElementById("workMgrDesc").src = "index.php?q=workManage/viewWorkTask&mode=user&userId=" + userId;
			}
		}

		function OnWorkPlan(departmentId) {
			var url = "index.php?q=workManage/viewWorkPlan&departmentId=" + departmentId;
			document.getElementById("workMgrDesc").src = url;
		}

		function OnWorkTask(userId) {
			var url = "index.php?q=workManage/viewWorkTask&mode=user&userId=" + userId;
			document.getElementById("workMgrDesc").src = url;
		}
	 //-->
	 </script>
 </BODY>
</HTML>
